<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-pet-add">
			<div class="form-group">
			<label class="col-sm-3 control-label">主人：</label>
			<div class="col-sm-8">
				<!--<input id="masterId" name="masterId" class="form-control" type="text">-->
				<select class="form-control"id="masterId" name="masterId">
					<option value="" selected></option>
					<option th:each="m:${masters}" th:text="${m.name}" th:value="${m.id}"></option>
				</select>
			</div>
		</div>
	
			<div class="form-group">
			<label class="col-sm-3 control-label">名称：</label>
			<div class="col-sm-8">
				<input id="name" name="name" class="form-control" type="text">
			</div>
		</div>
	
	</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
	var prefix = ctx + "test/pet"
	$("#form-pet-add").validate({
		onkeyup: false,
		rules:{
			xxxx:{
				required:true,
			},
		}
	});

	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/addDo", $('#form-pet-add').serialize());
		}
	}
</script>
</body>
</html>
